package com.ncloud.aaaa.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.ncloud.aaaa.model.User;

public interface UserRepository extends JpaRepository<User, Long> {

	User getByAccountAndPwdAndState(String account, String pwd,String state);

	User getByAccount(String account);
	
	@Query("select a from User a where a.state ='1' and a.account =?1")
	List<User> isUserAccount(String account);

	User getByIdAndState(Long userId, String state);
}
